gen:
	protoc \
		--go_out=Mgoogle/api/annotations.proto=src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:src/grpc-test/pb \
		-I src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
		-I src/grpc-test/pb \
		src/grpc-test/pb/hello.proto

	protoc \
		-I src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
		-I src/grpc-test/pb \
		--grpc-gateway_out=logtostderr=true:src/grpc-test/pb \
		src/grpc-test/pb/hello.proto
	
	protoc \
		-I src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
		-I src/grpc-test/pb \
 		--swagger_out=logtostderr=true:src/grpc-test/pb \
		src/grpc-test/pb/hello.proto
	python -c 's="src/grpc-test/pb/hello.pb.go"; r=open(s).read(); r=r.replace("src/",""); open(s,"w").write(r)'
